Integrand size = 21, antiderivative size = 177 \[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=-\frac {(a+3 b) \log (1-\sin (c+d x))}{4 (a+b)^3 d}+\frac {(a-3 b) \log (1+\sin (c+d x))}{4 (a-b)^3 d}+\frac {4 a b^3 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}-\frac {b \left (a^2+3 b^2\right )}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2747, 755, 815} \[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=-\frac {b \left (a^2+3 b^2\right )}{2 d \left (a^2-b^2\right )^2 (a+b \sin (c+d x))}-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))}+\frac {4 a b^3 \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )^3}-\frac {(a+3 b) \log (1-\sin (c+d x))}{4 d (a+b)^3}+\frac {(a-3 b) \log (\sin (c+d x)+1)}{4 d (a-b)^3} \]
[In]
[Out]
Rule 755
Rule 815
Rule 2747
Rubi steps \begin{align*} \text {integral}& = \frac {b^3 \text {Subst}\left (\int \frac {1}{(a+x)^2 \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = -\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}+\frac {b \text {Subst}\left (\int \frac {a^2-3 b^2+2 a x}{(a+x)^2 \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{2 \left (a^2-b^2\right ) d} \\ & = -\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}+\frac {b \text {Subst}\left (\int \left (\frac {(a-b) (a+3 b)}{2 b (a+b)^2 (b-x)}+\frac {a^2+3 b^2}{(a-b) (a+b) (a+x)^2}+\frac {8 a b^2}{(a-b)^2 (a+b)^2 (a+x)}+\frac {(a-3 b) (a+b)}{2 (a-b)^2 b (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{2 \left (a^2-b^2\right ) d} \\ & = -\frac {(a+3 b) \log (1-\sin (c+d x))}{4 (a+b)^3 d}+\frac {(a-3 b) \log (1+\sin (c+d x))}{4 (a-b)^3 d}+\frac {4 a b^3 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}-\frac {b \left (a^2+3 b^2\right )}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))} \\ \end{align*}
Time = 1.36 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.25 \[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {a ((a-b) \log (1-\sin (c+d x))-(a+b) \log (1+\sin (c+d x))+2 b \log (a+b \sin (c+d x)))}{(a-b) (a+b)}+\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{a+b \sin (c+d x)}-b \left (-a^2-3 b^2\right ) \left (-\frac {\log (1-\sin (c+d x))}{2 b (a+b)^2}+\frac {\log (1+\sin (c+d x))}{2 (a-b)^2 b}-\frac {2 a \log (a+b \sin (c+d x))}{(a-b)^2 (a+b)^2}+\frac {1}{\left (a^2-b^2\right ) (a+b \sin (c+d x))}\right )}{2 \left (-a^2+b^2\right ) d} \]
[In]
[Out]
Time = 2.15 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.82
method | result | size |
derivativedivides | \(\frac {-\frac {b^{3}}{\left (a +b \right )^{2} \left (a -b \right )^{2} \left (a +b \sin \left (d x +c \right )\right )}+\frac {4 a \,b^{3} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}-\frac {1}{4 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (-a -3 b \right ) \ln \left (\sin \left (d x +c \right )-1\right )}{4 \left (a +b \right )^{3}}-\frac {1}{4 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {\left (a -3 b \right ) \ln \left (1+\sin \left (d x +c \right )\right )}{4 \left (a -b \right )^{3}}}{d}\) | \(146\) |
default | \(\frac {-\frac {b^{3}}{\left (a +b \right )^{2} \left (a -b \right )^{2} \left (a +b \sin \left (d x +c \right )\right )}+\frac {4 a \,b^{3} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}-\frac {1}{4 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (-a -3 b \right ) \ln \left (\sin \left (d x +c \right )-1\right )}{4 \left (a +b \right )^{3}}-\frac {1}{4 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {\left (a -3 b \right ) \ln \left (1+\sin \left (d x +c \right )\right )}{4 \left (a -b \right )^{3}}}{d}\) | \(146\) |
parallelrisch | \(\frac {8 a^{2} \left (\frac {b \sin \left (3 d x +3 c \right )}{2}+\frac {b \sin \left (d x +c \right )}{2}+\cos \left (2 d x +2 c \right ) a +a \right ) b^{3} \ln \left (2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )-\left (a +3 b \right ) a \left (\frac {b \sin \left (3 d x +3 c \right )}{2}+\frac {b \sin \left (d x +c \right )}{2}+\cos \left (2 d x +2 c \right ) a +a \right ) \left (a -b \right )^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (\left (a -3 b \right ) \left (a +b \right )^{2} a \left (\frac {b \sin \left (3 d x +3 c \right )}{2}+\frac {b \sin \left (d x +c \right )}{2}+\cos \left (2 d x +2 c \right ) a +a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+2 \left (\frac {3 \left (-a^{3} b +a \,b^{3}\right ) \cos \left (2 d x +2 c \right )}{2}+\frac {\left (-a^{2} b^{2}+3 b^{4}\right ) \sin \left (3 d x +3 c \right )}{2}+\left (a^{4}-\frac {3}{2} a^{2} b^{2}+\frac {3}{2} b^{4}\right ) \sin \left (d x +c \right )-\frac {5 a^{3} b}{2}+\frac {5 a \,b^{3}}{2}\right ) \left (a -b \right )\right ) \left (a +b \right )}{2 \left (a +b \right )^{3} a \left (\frac {b \sin \left (3 d x +3 c \right )}{2}+\frac {b \sin \left (d x +c \right )}{2}+\cos \left (2 d x +2 c \right ) a +a \right ) \left (a -b \right )^{3} d}\) | \(343\) |
norman | \(\frac {\frac {4 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (a^{2}-b^{2}\right )}+\frac {-a^{4}-a^{2} b^{2}-2 b^{4}}{2 b d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}-\frac {\left (-a^{4}+3 a^{2} b^{2}-6 b^{4}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d b \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}-\frac {\left (-a^{4}+3 a^{2} b^{2}-6 b^{4}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d b \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}+\frac {\left (-a^{4}-a^{2} b^{2}-2 b^{4}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 b d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2} \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}+\frac {\left (a -3 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {\left (a +3 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}+\frac {4 a \,b^{3} \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}\) | \(437\) |
risch | \(-\frac {i a c}{2 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {3 i b x}{2 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {3 i b c}{2 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}-\frac {i a x}{2 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {3 i b c}{2 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {8 i a \,b^{3} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}-\frac {8 i a \,b^{3} c}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}-\frac {i \left (-i a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-3 i b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-6 i a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}-2 i b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+2 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-2 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-i a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-3 i b^{3} {\mathrm e}^{i \left (d x +c \right )}-2 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+2 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}\right )}{\left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{2} \left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+i b \right ) d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}+\frac {3 i b x}{2 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {i a x}{2 a^{3}+6 a^{2} b +6 a \,b^{2}+2 b^{3}}+\frac {i a c}{2 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}-\frac {\ln \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right ) a}{2 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}-\frac {3 \ln \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right ) b}{2 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a}{2 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{2 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}\) | \(751\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 381 vs. \(2 (170) = 340\).
Time = 0.36 (sec) , antiderivative size = 381, normalized size of antiderivative = 2.15 \[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=-\frac {2 \, a^{4} b - 4 \, a^{2} b^{3} + 2 \, b^{5} + 2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{2} - 16 \, {\left (a b^{4} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + a^{2} b^{3} \cos \left (d x + c\right )^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - {\left ({\left (a^{4} b - 6 \, a^{2} b^{3} - 8 \, a b^{4} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{5} - 6 \, a^{3} b^{2} - 8 \, a^{2} b^{3} - 3 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left ({\left (a^{4} b - 6 \, a^{2} b^{3} + 8 \, a b^{4} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{5} - 6 \, a^{3} b^{2} + 8 \, a^{2} b^{3} - 3 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} \sin \left (d x + c\right )}{4 \, {\left ({\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} d \cos \left (d x + c\right )^{2}\right )}} \]
[In]
[Out]
\[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\int \frac {\sec ^{3}{\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{2}}\, dx \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 275, normalized size of antiderivative = 1.55 \[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {16 \, a b^{3} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {{\left (a - 3 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (a + 3 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left (2 \, a^{2} b + 2 \, b^{3} - {\left (a^{2} b + 3 \, b^{3}\right )} \sin \left (d x + c\right )^{2} - {\left (a^{3} - a b^{2}\right )} \sin \left (d x + c\right )\right )}}{a^{5} - 2 \, a^{3} b^{2} + a b^{4} - {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (d x + c\right )^{3} - {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} \sin \left (d x + c\right )^{2} + {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (d x + c\right )}}{4 \, d} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.38 \[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {16 \, a b^{4} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} + \frac {{\left (a - 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (a + 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left (a^{2} b \sin \left (d x + c\right )^{2} + 3 \, b^{3} \sin \left (d x + c\right )^{2} + a^{3} \sin \left (d x + c\right ) - a b^{2} \sin \left (d x + c\right ) - 2 \, a^{2} b - 2 \, b^{3}\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (b \sin \left (d x + c\right )^{3} + a \sin \left (d x + c\right )^{2} - b \sin \left (d x + c\right ) - a\right )}}}{4 \, d} \]
[In]
[Out]
Time = 5.13 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.28 \[ \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {{\sin \left (c+d\,x\right )}^2\,\left (a^2\,b+3\,b^3\right )}{2\,\left (a^4-2\,a^2\,b^2+b^4\right )}-\frac {a^2\,b+b^3}{{\left (a^2-b^2\right )}^2}+\frac {a\,\sin \left (c+d\,x\right )}{2\,\left (a^2-b^2\right )}}{d\,\left (-b\,{\sin \left (c+d\,x\right )}^3-a\,{\sin \left (c+d\,x\right )}^2+b\,\sin \left (c+d\,x\right )+a\right )}-\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (\frac {b}{2\,{\left (a+b\right )}^3}+\frac {1}{4\,{\left (a+b\right )}^2}\right )}{d}+\frac {\ln \left (\sin \left (c+d\,x\right )+1\right )\,\left (a-3\,b\right )}{4\,d\,{\left (a-b\right )}^3}+\frac {4\,a\,b^3\,\ln \left (a+b\,\sin \left (c+d\,x\right )\right )}{d\,\left (a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6\right )} \]
[In]
[Out]